package org.skyfree.ghyll.tcard.progress.action;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.skyfree.ghyll.tcard.progress.ProgressExplorer;

public class ActionDelegate implements IViewActionDelegate
{
	private ProgressExplorer view;
	@Override
	public void init(IViewPart view) 
	{
		if(view instanceof ProgressExplorer){
			this.view=(ProgressExplorer)view;
		}
		
	}

	@Override
	public void run(IAction action) 
	{
		String id=action.getId();
		if(id.equals("toolbar.fresh")){
			this.view.getTreeViewer().refresh();
			return;
		}
	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) 
	{
		
	}
	
	
}
